package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcCheckInfo;
import com.visizen.wisdomclass.server.model.WcCheckInfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcCheckInfoMapper {
    @SelectProvider(type=WcCheckInfoSqlProvider.class, method="countByExample")
    int countByExample(WcCheckInfoExample example);

    @DeleteProvider(type=WcCheckInfoSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcCheckInfoExample example);

    @Delete({
        "delete from wc_check_info",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long ID);

    @Insert({
        "insert into wc_check_info (ID, INFORM_ID, ",
        "USER_ID, CHEACK_TIME)",
        "values (#{ID,jdbcType=BIGINT}, #{INFORM_ID,jdbcType=BIGINT}, ",
        "#{USER_ID,jdbcType=BIGINT}, #{CHEACK_TIME,jdbcType=TIMESTAMP})"
    })
    int insert(WcCheckInfo record);

    @InsertProvider(type=WcCheckInfoSqlProvider.class, method="insertSelective")
    int insertSelective(WcCheckInfo record);

    @SelectProvider(type=WcCheckInfoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="INFORM_ID", property="INFORM_ID", jdbcType=JdbcType.BIGINT),
        @Result(column="USER_ID", property="USER_ID", jdbcType=JdbcType.BIGINT),
        @Result(column="CHEACK_TIME", property="CHEACK_TIME", jdbcType=JdbcType.TIMESTAMP)
    })
    List<WcCheckInfo> selectByExample(WcCheckInfoExample example);

    @Select({
        "select",
        "ID, INFORM_ID, USER_ID, CHEACK_TIME",
        "from wc_check_info",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="INFORM_ID", property="INFORM_ID", jdbcType=JdbcType.BIGINT),
        @Result(column="USER_ID", property="USER_ID", jdbcType=JdbcType.BIGINT),
        @Result(column="CHEACK_TIME", property="CHEACK_TIME", jdbcType=JdbcType.TIMESTAMP)
    })
    WcCheckInfo selectByPrimaryKey(Long ID);

    @UpdateProvider(type=WcCheckInfoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcCheckInfo record, @Param("example") WcCheckInfoExample example);

    @UpdateProvider(type=WcCheckInfoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcCheckInfo record, @Param("example") WcCheckInfoExample example);

    @UpdateProvider(type=WcCheckInfoSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcCheckInfo record);

    @Update({
        "update wc_check_info",
        "set INFORM_ID = #{INFORM_ID,jdbcType=BIGINT},",
          "USER_ID = #{USER_ID,jdbcType=BIGINT},",
          "CHEACK_TIME = #{CHEACK_TIME,jdbcType=TIMESTAMP}",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(WcCheckInfo record);
}